from deepdiff import DeepDiff
from loguru import logger

class AssertTemplate:

    def assert_deepdiff_response(self, old_response, response):
        deepdiff = DeepDiff(old_response, response)
        if "dictionary_item_added" in str(deepdiff) and "dictionary_item_removed" in str(deepdiff):
            logger.info(f"比对字段结果： {deepdiff}")
            return False
        else:
            return True